Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Making Thumbnail Pictures


MakeThumbnailFromPicture

The MakeThumbnailFromPicture function creates an 80-by-80 pixel thumbnail picture from a specified picture structure.

pascal OSErr MakeThumbnailFromPicture (PicHandle picture, 
                              short colorDepth, 
                              PicHandle thumbnail,
                              ProgressProcRecordPtr progressProc);
picture
Contains a handle to the image from which the thumbnail is to be extracted. The image must be stored in a picture structure.
colorDepth

Specifies the depth at which the image is likely to be viewed. If you set this parameter to 0, the Image Compression Manager determines the appropriate value for the source image. Values of 1, 2, 4, 8, 16, 24, and 32 indicate the number of bits per pixel for color images. Values of 34, 36, and 40 indicate 2-bit, 4-bit, and 8-bit grayscale, respectively, for grayscale images.
thumbnail
Contains a handle to the destination picture structure for the thumbnail image. The compressor resizes this handle for the resulting data.
progressProc
Points to a progress function structure. During the operation, the Image Compression Manager will occasionally call a function you provide in order to report its progress (see "Progress Functions" beginning on page 3-146 for more information about progress functions). If you have not provided a progress function, set this parameter to nil. If you pass a value of -1, you obtain a standard progress function.
RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
memFullErr-108Not enough memory available
codecAbortErr-8967Operation aborted by the progress function

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996